package com.hutu.erp.catalog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hutu.erp.catalog.mapper.ProductPictureMapper;
import com.hutu.erp.catalog.domain.ProductPicture;
import com.hutu.erp.catalog.service.IProductPictureService;

/**
 * 商品图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-24
 */
@Service
public class ProductPictureServiceImpl implements IProductPictureService 
{
    @Autowired
    private ProductPictureMapper productPictureMapper;

    /**
     * 查询商品图片
     * 
     * @param productPictureId 商品图片ID
     * @return 商品图片
     */
    @Override
    public ProductPicture selectProductPictureById(Long productPictureId)
    {
        return productPictureMapper.selectProductPictureById(productPictureId);
    }

    /**
     * 查询商品图片列表
     * 
     * @param productPicture 商品图片
     * @return 商品图片
     */
    @Override
    public List<ProductPicture> selectProductPictureList(ProductPicture productPicture)
    {
        return productPictureMapper.selectProductPictureList(productPicture);
    }

    /**
     * 新增商品图片
     * 
     * @param productPicture 商品图片
     * @return 结果
     */
    @Override
    public int insertProductPicture(ProductPicture productPicture)
    {
        return productPictureMapper.insertProductPicture(productPicture);
    }

    /**
     * 修改商品图片
     * 
     * @param productPicture 商品图片
     * @return 结果
     */
    @Override
    public int updateProductPicture(ProductPicture productPicture)
    {
        return productPictureMapper.updateProductPicture(productPicture);
    }

    /**
     * 批量删除商品图片
     * 
     * @param productPictureIds 需要删除的商品图片ID
     * @return 结果
     */
    @Override
    public int deleteProductPictureByIds(Long[] productPictureIds)
    {
        return productPictureMapper.deleteProductPictureByIds(productPictureIds);
    }

    /**
     * 删除商品图片信息
     * 
     * @param productPictureId 商品图片ID
     * @return 结果
     */
    @Override
    public int deleteProductPictureById(Long productPictureId)
    {
        return productPictureMapper.deleteProductPictureById(productPictureId);
    }
}
